package com.ks.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ks.entity.MetricData;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface MetricDataMapper extends BaseMapper<MetricData> {


    IPage<MetricData> pageMetricData(IPage page);

    @Delete("delete from metric_data")
    void deleteAll();

    List<MetricData> selectMetricDataByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}
